<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta charset=utf8>
</head>
<body>

<script>
    var date = new Date();
    console.log(date);
    console.log(typeof date);
    console.log(date.constructor);

    document.write('当前年: '+date.getYear()+'<br>');
    document.write('当前公元年: '+date.getFullYear()+'<br>');
    document.write('当前月: '+date.getMonth()+'<br>');

    document.write('当前星期: '+date.getDay()+'<br>');

    document.write('当前日期: '+date.getDate()+'<br>');

    document.write('当前小时: '+date.getHours()+'<br>');

    document.write('当前分钟: '+date.getMinutes()+'<br>');

    document.write('当前秒: '+date.getSeconds()+'<br>');

    document.write('当前毫秒: '+date.getMilliseconds()+'<br>');

    document.write('当前UTC小时: '+date.getUTCHourse()+'<br>');


    console.log(date.toString());
    console.log(date.toUTCString());
    console.log(date.toLocaleString());

</script>
    
</body>
</html>